<?php
namespace Home\Controller;
use Think\Controller;
class GoodsController extends Controller {

   //根据物品类别查找对应的物品
	  public function lookGoods(){
       $Goods=M("Goods");
       $GoodsCalssify=$_POST["goodscalssify"];

       $data=$Goods
       ->field("t_goods.goods_name,t_goods.goods_id")
       ->where("goodssclassify_id='$GoodsCalssify'")->select();
       
       if ($data) {
           $this->ajaxReturn(array(
	        		"code"=>200,
	        		"message"=>"查询成功！",
	        		"result"=>$data
	        		),"JSON");
	        }
        else{
        	$this->ajaxReturn(array(
	        		"code"=>500,
	        		"message"=>"查询失败！"
	        		),"JSON");
        }
 
    }











}